package com.yyge.controller.admin.mapstruct;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yyge.common.vo.resp.PageResp;
import com.yyge.controller.admin.categoryclass.req.CategoryClassReq;
import com.yyge.controller.admin.categoryclass.resp.CategoryClassResp;
import com.yyge.entity.CategoryClass;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface CategoryClassConverter {
    CategoryClassConverter MAPPER = Mappers.getMapper(CategoryClassConverter.class);

     @Mapping(source="records",target="rows")
     PageResp page2vo(Page list);

     CategoryClass categoryclass2req(CategoryClassReq req);
     List<CategoryClassResp> categoryclass2resp(List<CategoryClass> list);
}
